package com.cy.pj.arithmetic.service;

import com.cy.pj.common.web.ServiceException;
import org.springframework.stereotype.Service;

@Service
public class ArithemeticService {
    public int sum(int a,int b){
        if(a<0||b<0)
            throw new ServiceException("参数值不能为负");
        return a+b;
    }
}
